package com.kkb.staticproxy;

import com.kkb.service.BookService;

public class ProxyBookService extends BookService {


    public void add(){
        try {
            System.out.println("开始事务");
            super.add(); //核心业务
            System.out.println("提交事务");
            //int a = 10/0;
        } catch (Exception e) {
            e.printStackTrace();
            System.out.println("回滚事务");
        }
    }
}
